package com.it.sun.yuebike.common.controller;

import cn.dev33.satoken.stp.StpUtil;
import com.it.sun.yuebike.base.model.vo.LoginVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName com.it.sun.yuebike.common.controller.LoginController
 * @Author sunmannian
 * @Date 2021/5/31 10:21
 * @Version V1.0
 * Description  <通用登录服务>
 * Copyright (C) 北京中电兴发科技有限公司  since 2021/5/31
 */
@RestController()
@Api(tags = "通用服务——用户登录")
public class LoginController {

    @PostMapping("/login")
    @ApiOperation(value = "登录服务")
    public String login(@RequestBody LoginVO loginVO) {
        StpUtil.setLoginId("22222");
        String tokenValueByLoginId = StpUtil.getTokenValueByLoginId("22222");
        return tokenValueByLoginId;
    }
}



